package com.netease.framework;

import android.app.Activity;
import android.app.ActivityGroup;
import android.app.ProgressDialog;
import android.content.ComponentName;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.Resources.NotFoundException;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.view.Window;
import android.widget.FrameLayout;
import android.widget.FrameLayout.LayoutParams;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class ActivityEx extends ActivityGroup
  implements c, e
{
  private static final String a = "ActivityEx";
  private static final String[] j;
  private View b = null;
  private LinearLayout c = null;
  private RelativeLayout d;
  private ImageView e = null;
  private TextView f = null;
  private ImageView g = null;
  private ImageView h;
  private boolean i = true;
  private ProgressDialog k;
  private final String l = "logname";
  private String m = null;

  static
  {
    String[] arrayOfString = new String[3];
    arrayOfString[0] = "android.widget.";
    arrayOfString[1] = "android.view.";
    arrayOfString[2] = "android.webkit.";
    j = arrayOfString;
  }

  private void b()
  {
    getLayoutInflater().setFactory(new a(this));
  }

  private String c()
  {
    Object localObject = null;
    try
    {
      ActivityInfo localActivityInfo2 = getPackageManager().getActivityInfo(e(), 128);
      localActivityInfo1 = localActivityInfo2;
      if (localActivityInfo1 == null)
        return localObject;
    }
    catch (PackageManager.NameNotFoundException localNameNotFoundException)
    {
      while (true)
      {
        localNameNotFoundException.printStackTrace();
        ActivityInfo localActivityInfo1 = null;
        continue;
        if (localActivityInfo1.metaData == null)
          continue;
        int n = localActivityInfo1.metaData.getInt("logname");
        if (n <= 0)
          continue;
        try
        {
          String str = getResources().getString(n);
          localObject = str;
        }
        catch (Resources.NotFoundException localNotFoundException)
        {
          localNotFoundException.printStackTrace();
        }
      }
    }
  }

  private ComponentName e()
  {
    ComponentName localComponentName = getComponentName();
    if (localComponentName == null)
      localComponentName = new ComponentName(this, getClass());
    return localComponentName;
  }

  public void a(Activity paramActivity)
  {
    j.d(paramActivity);
  }

  public void a(Drawable paramDrawable)
  {
    if (this.d != null)
      this.d.setBackgroundDrawable(paramDrawable);
  }

  public void a(ViewGroup.LayoutParams paramLayoutParams)
  {
    if (this.d != null)
      this.d.setLayoutParams(paramLayoutParams);
  }

  public void a(String paramString1, String paramString2)
  {
    if (this.k != null)
      j();
    this.k = ProgressDialog.show(this, paramString1, paramString2, true, true);
  }

  protected void a(boolean paramBoolean)
  {
    this.i = paramBoolean;
  }

  public void b(Activity paramActivity)
  {
    j.i(paramActivity);
  }

  public void b(Drawable paramDrawable)
  {
    this.e.setImageDrawable(paramDrawable);
    this.e.setVisibility(0);
  }

  public void b(String paramString)
  {
    a(null, paramString);
  }

  public void c(int paramInt)
  {
    if (this.d != null)
      this.d.setBackgroundResource(paramInt);
  }

  public void c(Activity paramActivity)
  {
    j.g(paramActivity);
  }

  public void c(Drawable paramDrawable)
  {
    this.g.setImageDrawable(paramDrawable);
    this.g.setVisibility(0);
  }

  public void d(int paramInt)
  {
    this.e.setImageResource(paramInt);
    this.e.setVisibility(0);
  }

  public void d(Activity paramActivity)
  {
    j.f(paramActivity);
  }

  public void e(int paramInt)
  {
    this.e.setVisibility(paramInt);
  }

  public void e(Activity paramActivity)
  {
    j.e(paramActivity);
  }

  protected boolean e_()
  {
    return false;
  }

  public void f(int paramInt)
  {
    this.g.setImageResource(paramInt);
    this.g.setVisibility(0);
  }

  public void f(Activity paramActivity)
  {
    j.h(paramActivity);
  }

  public void f_()
  {
  }

  public void g(int paramInt)
  {
    this.g.setVisibility(paramInt);
  }

  public void h(int paramInt)
  {
    this.h.setBackgroundResource(paramInt);
  }

  protected void i()
  {
  }

  public void j()
  {
    if (this.k != null)
    {
      this.k.dismiss();
      this.k = null;
    }
  }

  public void k()
  {
    if (this.d != null)
      this.d.setVisibility(8);
  }

  public void l()
  {
    if (this.d != null)
      this.d.setVisibility(0);
  }

  public void m()
  {
    this.h.setVisibility(0);
    this.h.setOnClickListener(new n(this));
  }

  public boolean n()
  {
    if (this.h.getVisibility() == 0);
    for (int n = 1; ; n = 0)
      return n;
  }

  public void o()
  {
    this.h.setVisibility(8);
  }

  public void onConfigurationChanged(Configuration paramConfiguration)
  {
    super.onConfigurationChanged(paramConfiguration);
  }

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    b();
    if (this.i)
    {
      getWindow().requestFeature(1);
      a(this);
      if (e_())
        break label121;
      super.setContentView(getLayoutInflater().inflate(2130903040, null));
    }
    while (true)
    {
      this.c = ((LinearLayout)findViewById(2131558400));
      this.d = ((RelativeLayout)findViewById(2131558401));
      this.e = ((ImageView)findViewById(2131558402));
      this.f = ((TextView)findViewById(2131558403));
      this.g = ((ImageView)findViewById(2131558408));
      return;
      label121: FrameLayout localFrameLayout = new FrameLayout(this);
      localFrameLayout.setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
      this.h = new ImageView(this);
      this.h.setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
      this.h.setBackgroundResource(2130837635);
      this.h.setVisibility(8);
      localFrameLayout.addView(getLayoutInflater().inflate(2130903040, null), 0);
      localFrameLayout.addView(this.h, 1);
      super.setContentView(localFrameLayout);
    }
  }

  public void onCreateContextMenu(ContextMenu paramContextMenu, View paramView, ContextMenu.ContextMenuInfo paramContextMenuInfo)
  {
    super.onCreateContextMenu(paramContextMenu, paramView, paramContextMenuInfo);
  }

  public boolean onCreateOptionsMenu(Menu paramMenu)
  {
    return super.onCreateOptionsMenu(paramMenu);
  }

  protected void onDestroy()
  {
    b(this);
    super.onDestroy();
  }

  public boolean onOptionsItemSelected(MenuItem paramMenuItem)
  {
    return super.onOptionsItemSelected(paramMenuItem);
  }

  protected void onPause()
  {
    c(this);
    super.onPause();
  }

  public boolean onPrepareOptionsMenu(Menu paramMenu)
  {
    return super.onPrepareOptionsMenu(paramMenu);
  }

  protected void onResume()
  {
    super.onResume();
    d(this);
    com.netease.pris.d.c.b(p());
  }

  public boolean onSearchRequested()
  {
    return false;
  }

  protected void onStart()
  {
    super.onStart();
    e(this);
  }

  protected void onStop()
  {
    f(this);
    super.onStop();
  }

  public String p()
  {
    if (this.m == null)
      this.m = c();
    return this.m;
  }

  public void setContentView(int paramInt)
  {
    if (this.i)
      setContentView(((LayoutInflater)getSystemService("layout_inflater")).inflate(paramInt, null, false));
    while (true)
    {
      return;
      super.setContentView(paramInt);
    }
  }

  public void setContentView(View paramView)
  {
    if (this.c != null)
    {
      if (this.b != null)
        this.c.removeView(this.b);
      paramView.setLayoutParams(new LinearLayout.LayoutParams(-1, -1));
      this.c.addView(paramView, 1);
      this.b = paramView;
    }
    while (true)
    {
      return;
      super.setContentView(paramView);
    }
  }

  public void setTitle(int paramInt)
  {
    this.f.setText(paramInt);
  }

  public void setTitle(CharSequence paramCharSequence)
  {
    this.f.setText(paramCharSequence);
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.framework.ActivityEx
 * JD-Core Version:    0.6.0
 */